package com.dwxt.parabolic.task;

import com.dwxt.parabolic.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class Task {
    @Autowired
    private TaskService taskService;

    //每天删除压缩文件
    @Scheduled(cron = "0 0 0 * * ? ")
    //@Scheduled(cron = "0 0/1 * * * ? ")
    @Async("processExecutor")
    public void deleteFile() {
        taskService.deleteFile();
    }
}
